feat: support dot in repo owner and repo name#133
Conversation
📝 WalkthroughWalkthroughThe changes extend GitHub repository parsing to support repository names containing dots by updating regex patterns, introducing test data constants for a dotted repository, and adding a new test case validating the enhanced pattern matching functionality. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@PatchPanda.Units/Helpers/ParsingHelperTests.cs`:
- Around line 215-252: Add a new unit test to cover the GitHub URL extraction
path for dot-containing repos: create a test similar to
SetGitHubRepo_SetsRepo_WhenRepositoryContainsDot but set response.Image to the
GitHub URL (e.g.,
$"https://github.com/{TestData.DOT_OWNER}/{TestData.DOT_REPO}"), create a
release with that URL via CreateRelease, mock IVersionService.GetVersions to
return the release when passed the tuple (TestData.DOT_OWNER,
TestData.DOT_REPO), call container.SetGitHubRepo(response,
versionServiceMock.Object, logger) and assert container.GitHubRepo equals new
Tuple(TestData.DOT_OWNER, TestData.DOT_REPO) and container.GitHubVersionRegex
equals VersionHelper.BuildRegexFromVersion(TestData.NEW_VERSION) to ensure the
GitHub URL regex path in ParsingHelper.cs is exercised.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: c9691329-c73a-4a64-8f75-009de1c2895d
📒 Files selected for processing (3)
PatchPanda.Units/Helpers/ParsingHelperTests.csPatchPanda.Units/TestData.csPatchPanda.Web/Helpers/ParsingHelper.cs
Summary by CodeRabbit
Release Notes